const express=require("express")
const router=express.Router();
const pool=require("../pool");
//汽车收藏列表
router.get("/",(req,res)=>{
  //var id=req.session.uid
  let id = req.query.uid;
  var sql=`SELECT d.cid,d.src,d.title,d.des,d.price,c.did,c.id 
           FROM car_type d,yhc_cart c 
           WHERE d.cid = c.did AND uid = ?`;
  pool.query(sql,[id],(err,result)=>{
    if(err) throw err;
    res.send({code:1,data:result})
    console.log(result);
  })
})
module.exports=router;